There shouldn't be any code that calls zoomOutActor() without
a monitor, but throwing in an early return doesn't hurt.
CID 351285.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
}
function zoomOutActorAtPos(actor, x, y) {
+ const monitor = Main.layoutManager.findMonitorForActor(actor);
+ if (!monitor)
+ return;
+
const actorClone = new Clutter.Clone({
source: actor,
reactive: false,
Main.uiGroup.add_actor(actorClone);
// Avoid monitor edges to not zoom outside the current monitor
- let monitor = Main.layoutManager.findMonitorForActor(actor);
let scaledWidth = width * APPICON_ANIMATION_OUT_SCALE;
let scaledHeight = height * APPICON_ANIMATION_OUT_SCALE;
let scaledX = x - (scaledWidth - width) / 2;